<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<script>
$(function() {
	$('#search_text').val("${name}");
});
function addFavorite(url, title) {
	try {
		window.external.addFavorite(url, title);
	} catch (e){
		try {
			window.sidebar.addPanel(title, url, '');
        	} catch (e) {
			alert("请按 Ctrl+D 键添加到收藏夹", 'notice');
		}
	}
}
function search()
{
	if($('#search_text').val()=="")
	{
		alert("请输入你要搜索的内容！");
		return;
	}

	var name = $('#search_text').val()
	window.location.href = "/TeaShop/home/product/list?name="+name;
	
	
}
</script>
<!--顶部样式-->
<div id="top">
  <div class="top">
    <div class="Collection"><em></em><a href="#" onclick="addFavorite('http://localhost:8080/TeaShop/home/system/index','茶商城网站')" title="收藏茶商城网站" >收藏我们</a></div>
	<div class="hd_top_manu clearfix">
	  <ul class="clearfix">
	   <c:if test="${account == null}">
		    <li class="hd_menu_tit zhuce" data-addclass="hd_menu_hover">欢迎光临本店！
			   <a href="/TeaShop/home/login" class="red">[请登录]</a>
			   	 新用户<a href="/TeaShop/home/register" class="red">[免费注册]</a>
			</li>
			 <li class="hd_menu_tit" data-addclass="hd_menu_hover"><a href="#">我的订单</a></li> 
	   		 <li class="hd_menu_tit" data-addclass="hd_menu_hover"> <a href="/TeaShop/home/shopping/cart">购物车(<b>0</b>)</a> </li>
	   		  <li class="hd_menu_tit" data-addclass="hd_menu_hover"><a href="/TeaShop/system/index">后台管理</a></li> 
	    </c:if>
	    <c:if test="${account != null}">
	     	<li class="hd_menu_tit zhuce" data-addclass="hd_menu_hover">欢迎光临本店！
		   		 当前用户：<a href="/TeaShop/home/account/info" class="red">${account.username}</a>
		   	</li>
		   	  <li class="hd_menu_tit" data-addclass="hd_menu_hover"><a href="/TeaShop/home/account/order?page=1&rows=7">我的订单</a></li> 
	   		  <li class="hd_menu_tit" data-addclass="hd_menu_hover"> <a href="/TeaShop/home/shopping/cart">购物车(<b>${cartTotal}</b>)</a> </li>
	   		  <li class="hd_menu_tit" data-addclass="hd_menu_hover"><a href="/TeaShop/home/system/logout">退出用户</a></li>
	   		  <li class="hd_menu_tit" data-addclass="hd_menu_hover"><a href="/TeaShop/system/index">后台管理</a></li> 
	    </c:if>
	  </ul>
	</div>
  </div>
</div>
<!--logo和搜索样式-->
<div id="header"  class="header">
  <div class="logo">
  <a href="/TeaShop/home/system/index"><img src="../../resources/home/images/logo.png" /></a>
  <div class="phone">
   <span class="telephone"></span>
  </div>
  </div>
  <div class="Search">
    <p><input id="search_text" type="text"  class="text"/><input onclick="search();" type="button"  class="Search_btn"/></p>
	
</div>
</div>